package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the TM_LETRA_RUBRO database table.
 * 
 */
@Entity
@Table(name="TM_LETRA_RUBRO")
public class TmLetraRubro implements Serializable {
	private static final long serialVersionUID = 1L;
	private TmLetraRubroPK id;
	private String descRubro;
	private TmLibro tmLibro;

    public TmLetraRubro() {
    }


	@EmbeddedId
	public TmLetraRubroPK getId() {
		return this.id;
	}

	public void setId(TmLetraRubroPK id) {
		this.id = id;
	}
	

	@Column(name="DESC_RUBRO", nullable=false, length=50)
	public String getDescRubro() {
		return this.descRubro;
	}

	public void setDescRubro(String descRubro) {
		this.descRubro = descRubro;
	}


	//bi-directional many-to-one association to TmLibro
    @ManyToOne
	@JoinColumn(name="COD_LIBRO", nullable=false, insertable=false, updatable=false)
	public TmLibro getTmLibro() {
		return this.tmLibro;
	}

	public void setTmLibro(TmLibro tmLibro) {
		this.tmLibro = tmLibro;
	}
	
}